Repository navigation
client: a schedule card says which connectors its unattended run carries - #2344
Conversation
|
Written-by: Dev-1 Tip 6ede482 · tree 03a8cd7604be0b15f75bfbb9a6bd160169d07bb1 · base 7226d74 · 9 files, +7946/−7455 · draft (T1, waits for the advisory PASS) Verified commit 7d0ebca547b96c8b59b9812d8f3ee2755d1af178 (same tree; the pushed head is 6ede482). Red first on clean 7226d74: |
|
@Birfy — review request for this head:
Nothing here is waiting on a FlyBot self-test; FlyBot Test's advisory is already in hand at this head. |
|
Verdict: PASS at 6ede482 Ran at this tip: Review points:
Not run: the full |
Fixes #2323
Owner: Dev-1
Written-by: Dev-1
Reviewer: Birfy
Claim-Id: 29ebb349d6f74c4b9ebd5e3eb224ac6a
Branch: dev/1-schedule-connector-reach
Tip: 6ede482
Verified commit: 7d0ebca547b96c8b59b9812d8f3ee2755d1af178 (tree 03a8cd7604be0b15f75bfbb9a6bd160169d07bb1; the pushed head above is that same tree)
Tree: 03a8cd7604be0b15f75bfbb9a6bd160169d07bb1
Base: 7226d74
Diff: 9 files, +7946/−7455
Tier: T1
why: none — no T3 path, no diffPattern hit, no topic; lines 70 / files 5 (non-generated) / generated 4
What was wrong
A scheduled task fires with the reach its Bot has at that moment: turning Composio on for a Bot today changes what a task written weeks ago will use. No surface said so. The schedule row drew the timing and the room (
timingText,in {name}) and stopped there, so the owner learned which connectors an unattended run carried only after the fact — or not at all, since a scheduled turn is not watched.What changed
core/src/client/schedules.js— a new exportedreachText(task, roster)answers what an unattended run would carry for that task: the Bot this task belongs to, looked up in the roster (byIdfirst, thenbots), then everyconnectedConnectors(roster)entry this Bot may use (isOn). A room task has no single Bot's switch and a Bot the roster no longer carries has no switch to read, so both answer''rather than guessing. The row's hint is now built as one line from its parts (timing, room, reach) instead offilter(Boolean).join(' · ')on a fixed pair, so the timing half stays exactly whattimingTextanswers (schedules: a repeat of 90s is shown and saved as 2 minutes, so editing a title silently rewrites it #1651).core/src/client/i18n.js—Runs with {names}andRuns with no connectors, in English and Chinese.core/test/schedules-client.test.js— five cases: two connected connectors with no per-Bot record read as both; a connector switched off for this Bot drops out; every connected connector off reads "Runs with no connectors"; a sender never appears; a room task says nothing.docs/subsystems/core-client.mdcarries one sentence for the rule in theschedules.jsrow, andchangelog.d/2323-schedule-connector-reach.added.mdis the fragment.Why the generated bundle moves so far
core/client.jsandpatches/ds-bot/**are whatnode scripts/ds-bot-patches.mjs generatewrites at this tip; nothing here was hand-edited.canonicalanswersgenerate is a no-op, so the bytes are the generator's output.The
+1434/−1424churn is not the size of the source change, andcore/src/client/connector-bots.jsis not tree-shaken away on the base: it is already imported bycore/src/client/connectors.js:6andcore/src/client/bot-settings.js:13, and its block sits in the basecore/client.jsat about line 14060 (aliasimport_react27, 10 references). This change adds one import edge fromschedules.js, and esbuild then emits that module ahead ofschedules.js(tip: about line 5427, aliasimport_react6), so every alias fromimport_react6throughimport_react27shifts by exactly +1: 865 one-for-one hunks,+1434/−1424. All 22 aliases move by +1 and their reference counts are conserved (3398 = 3398 on both sides); no other alias family changes. Normalising the aliases and putting theconnector-botsblock back where it was leaves 4 hunks: the two i18n strings,reachText, and the two lines of the row's hint.Red first (clean
7226d745, tests only)core/test/schedules-client.test.js— 59 tests, 54 success + 0 cancelled + 5 failure:#2323 aat:861—expected 'Runs with GitHub, Composio',actual ''#2323 bat:866—expected 'Runs with GitHub',actual ''#2323 cat:871—expected 'Runs with no connectors',actual ''#2323 dat:877—expected 'Runs with GitHub, Composio',actual ''#2323 eat:883—reachText is not a functionAfter the fix the same file runs 59 tests, 59 success + 0 cancelled + 0 failure.
The five cases read the flattened fragments
<Text>renders; none of them asserts the assembled hint line. That the timing half still answers exactly whattimingTextanswers (#1651) is measured by a probe on this tip — the line reads… · Runs with …, and a missing part leaves no dangling separator — not by a case in this file.Gates at this tip
TZ=UTC ARCH_DOCS_BASE=7226d7455ff10ecfcf6dd99e7d41ffd25f1b0133 npm run verify— exit 0, 4747 tests / 4747 success / 0 cancelled / 0 failure (core 2760, social 570, tree 132, timeline 140, workflow 411, scripts+policy 671, interop 37, live-e2e 26);arch-docs: OK (9 changed file(s)); core lint74 warnings and 0 errors(74 is this base's own count — the same tree without this change reports it too), plugin lints36 / 9 / 2 / 16 warnings and 0 errors, live-e2e0 warnings and 0 errors.node core/scripts/build-client.mjs --check— exit 0.node scripts/ds-bot-patches.mjs check—ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5),ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/.node scripts/ds-bot-patches.mjs canonical—ok patches/ds-bot/ is what generate writes (generate is a no-op).scripts+policytests insideverify(changelog.d validity,ok 57).lint:interopreports 1 warning —dev/interop/isolation/probe.mjs:130no-unsafe-finally. The same warning is on the base tree, so it is pre-existing and does not block this change.Not run
core/dev/smoke.mjs— the change is client-only (core/src/client/**);index.jsandsrc/host/are untouched.packagejob's pack, typecheck and actionlint steps — not part ofnpm run verify.Checkpoint
{
"pr": 2344,
"claim": "Dev-1",
"issue": 2323,
"summary": "A scheduled task's row now names the connectors its unattended run will carry, read from the Bot's own switches at the moment the task fires rather than a copy stored with the task. A room task has no single Bot's switch and says nothing, and neither does a Bot the roster no longer carries. The reach reads connectedConnectors and isOn from connector-bots.js, so a sender and a webhook-only channel never appear and a missing per-Bot record means on. When every connected connector is off for that Bot the row reads "Runs with no connectors".",
"files": [
"core/src/client/schedules.js",
"core/test/schedules-client.test.js",
"core/src/client/i18n.js",
"docs/subsystems/core-client.md",
"changelog.d/2323-schedule-connector-reach.added.md"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=7226d7455ff10ecfcf6dd99e7d41ffd25f1b0133 npm run verify",
"result": "green",
"at": "7d0ebca547b96c8b59b9812d8f3ee2755d1af178"
},
"next": "none \u2014 ready for review"
}